# -*- coding:utf-8 -*-
from django.conf.urls import url
from views import QueryCompanyByCodeView, QueryCompanyByIDView, QueryAllCompanyIdView, QueryPersonByCodeView, \
    QueryPersonByIdView, QueryAllPersonByCompanyView, QueryElevatorInfoByCodeView, SendMisinformationView, \
    ReceiveMissionView, ComfirmMissonView, RefuseMissionView, CheckRefuseMissionView, \
    ArrivePositionView, EndMissionView, ComfirmMisinformationView, HelloWorldView, PushRescueMissionView, \
    PersonPositionsView, RescueTaskListView, RescueTaskRetrieveUpdateView, WaitRescueTaskNumView, \
    QueryElevatorRunningInfo, InitRescueTaskView

urlpatterns = [
    url(r"^hello/world/$", HelloWorldView.as_view(), name="hello-world"),
    url(r"^person/position/$", PersonPositionsView.as_view(), name="person-position"),
    # 根据电梯注册号查询维保商信息
    url(r"^company/code/$", QueryCompanyByCodeView.as_view(), name="query_company_info_by_code"),

    # 根据id查询维保商信息
    url(r"^company/id/$", QueryCompanyByIDView.as_view(), name="query_company_info_by_id"),

    # 查询所有维保商信息
    url(r"^company/all/$", QueryAllCompanyIdView.as_view(), name="query_all_company_id"),

    # 根据电梯注册号查询救援人员信息
    url(r"^person/code/$", QueryPersonByCodeView.as_view(), name="query_person_by_code"),

    # 根据救援人员ID获取信息
    url(r"^person/id/$", QueryPersonByIdView.as_view(), name="query_person_by_id"),

    # 根据维保公司ID获取其所有的救援人员id
    url(r"^person/all/$", QueryAllPersonByCompanyView.as_view(), name="query_all_person_id"),

    # 根据电梯注册码获取电梯的基本信息
    url(r"^elevator/code/$", QueryElevatorInfoByCodeView.as_view(), name="query_elevator_info_by_code"),
    # 获取根据电梯注册码获取电梯运行信息
    url(r"elevator/operation/$", QueryElevatorRunningInfo.as_view(),name="running-info"),

    # 发送误报信息
    url(r"^misinformation/$", SendMisinformationView.as_view(), name="send_misinformation"),

    # 坐席人员审核拒绝任务结果
    url(r"^check/refuse/$", CheckRefuseMissionView.as_view(), name="check_refuse_mission"),

    # 聆讯平台推送救援任务
    url(r"^push/rescue/$", PushRescueMissionView.as_view(), name="push_rescue_mission"),

    # app与聆讯的交互
    # 维保人员接收到救援任务
    url(r"^app/receive/mission/$", ReceiveMissionView.as_view(), name="app_receive_mission"),

    # 维保人员确认接收到救援任务
    url(r"^app/comfirm/mission/$", ComfirmMissonView.as_view(), name="app_comfirm_mission"),

    # 维保人员拒绝救援任务
    url(r"^app/refuse/mission/$", RefuseMissionView.as_view(), name="app_refuse_mission"),

    # 维保人员到达现场
    url(r"^app/person/arrive/$", ArrivePositionView.as_view(), name="app_person_arrive"),

    # 维保人员完成救援任务
    url(r"^app/end/mission/$", EndMissionView.as_view(), name="app_end_mission"),

    # 维保人员确认误报信息
    url(r"^app/comfirm/misinformation/$", ComfirmMisinformationView.as_view(), name="app_comfirm_misinformation"),

    # 获取任务单列表
    url(r"^app/task/list/$", RescueTaskListView.as_view(), name="app_task_list"),

    # 更新任务单
    url(r"^app/task/update/(?P<pk>\d+)/$", RescueTaskRetrieveUpdateView.as_view(), name="app_task_update"),

    # 获取待办任务单数
    url(r"^app/task/wait/$", WaitRescueTaskNumView.as_view(), name="app_task_wait_num"),
    url(r"^app/task/detail/$", InitRescueTaskView.as_view(), name="detail"),

]
